Britain has granted refugee status to Mohamed Nasheed, the former president of the Maldives who was jailed in 2015 after a trial that drew international criticism.